import Vue from 'vue'
import App from './App.vue'
import router from './router'

// 树形表格组件
import TreeTable from 'vue-table-with-tree-grid'

// 重置css样式
import './assets/css/reset.css'
// 引入 base 样式
import './assets/css/base.less'
import './assets/fonts/iconfont.css'

//  element-ui
import ElementUI from 'element-ui';
import 'element-ui/lib/theme-chalk/index.css';
Vue.use(ElementUI);

// echarts
import echarts from 'echarts'
Vue.prototype.$echarts=echarts;

Vue.config.productionTip = false


//导入封装axios
import http from "./api/index";
Vue.prototype.$http = http;

// 全局过滤器
import moment from "moment";
// 定义时间格式化全局过滤器
Vue.filter('dateFormat', (dateStr, pattern = 'YYYY-DD-MM HH:mm:ss') => {
  return moment(dateStr).format(pattern)
})

// 树形表格
Vue.component('tree-table', TreeTable)


new Vue({
  router,
  
  render: h => h(App)
}).$mount('#app')
